<template>
    <div class="wz">
        <div class="contentt">
            <ul>
                <li v-for="item in newslist" :key="item._id">
                    <router-link :to="'/home/wzinfo/'+item._id">
                        <h4>{{item.title}}</h4>
                        <p>{{item.content}}</p>
                        <span>{{item.airname}}</span>
                    </router-link>
                </li>
            </ul>
        </div>
    </div>
</template>
<script>

export default {
    data(){
        return{
            newslist: []
        }
    },
    created(){
        this.getNewslist()
    },
    methods:{
        getNewslist(){
            
            this.$http.get('/wz').then(result=>{
                
                    this.newslist = result.body.msg;
                    console.log(result.body.msg)
                
            })
        }
    }
}
</script>
<style lang="scss">
    .wz{
       
        height: 900px;
        background: url(../../images/hui.jpg);
    }
    .contentt{
        position: absolute;
        left: 220px;
        li{
            height: 60px;
            width: 1200px;
            border: 1px solid skyblue;
            position: relative;
        }
        span{
            display: block;
            position: absolute;
            top: 15px;
            right: 10px;
            
            
            
        }
        a{
            text-decoration: none;
            color: #000;
            
            
        }
        p{
            position: absolute;
            bottom: 0;
            margin-bottom: 0;
            padding-left: 10px;
            color: black;
            overflow: hidden;
        }
        h4{
            position: absolute;
            top: 2px;
            padding-left: 10px;
        }
    }
    
</style>
